<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="jt.classic.system.object.IObject"%>
<%@ page import="jt.classic.system.workflow.WObject"%>
<%@ page import="org.limp.basework.Table"%>
<%@ page import="org.limp.mine.StringTool"%>
<%@ page import="org.limp.mine.DateTrimmer"%>
<%@ page import="java.util.Map"%>
<%@ page import="java.util.List"%>
<%
	String context = jt.classic.system.ISystem.getContextPath();
	
	IObject object = (IObject) request.getAttribute("object");
	
	WObject wobject = (WObject) request.getAttribute("wobject");
	
	String id = StringTool.checkString(request.getParameter("id"));
	
	String querykey = StringTool.checkString(request
			.getParameter("querykey"));
	
	Table table = wobject.itable("APP_LXDTL");
	
	List list = (List) object.icontent(table);
	
	Map info = (Map)((List)object.icontent(wobject.itable("APP_LX"))).get(0);
	
	String type = (String)info.get("LXTYPE");
	
	String label = "(街乡)";
	
	if(type.equals("1")){
		label = "(区)";
	} 
%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>来信登记</TITLE>
<jsp:include page="../../system/object/initial4edit.jsp"></jsp:include>

<link rel="stylesheet" type="text/css"
	href="<%=context%>/app/xf/css/xfstyle.css" />
<script src="<%=context %>/app/xf/js/xfinit.js"></script>
<script>
     handleTypeMap.put('DJRNAME', '0');

     function init(){
         initLxdjStyle();
         editObject();
     }
     
     function handleSave(){
         if(initCountItem()){
         	handleSubmit(function(){window.location.href = context + '/system/objquery/commonlist.jsp?queryKey=lxdjlist';});
         }
     }
</script>
</HEAD>
<BODY style="background-color:#fff;" onload="javascript:init();">
<form id="form1" name="form1" method="post"
	enctype="multipart/form-data" action=""><input type="hidden"
	name="lxid" value="" special="key">
<input type="hidden" name="xfid_0" value="" />	
<input type="hidden" name="LXID_0" value="" />
<div>&nbsp;</div>
<table width="800" class="tab4edit" border="1" cellspacing="0"
	cellpadding="0" align="center">
	<tr>
		<td colspan="4" class="tdtlt">
		<div align="center"><%=label %>来信案件登记</div>
		</td>
	</tr>
	<tr align="left" bgcolor="#FFFF99">
		<td colspan="4" valign="middle"><font color=red>带</font><font
			color="#003399">“</font><font color=red>*</font><font color="#003399">”</font><font
			color=red>的项目为必填项</font></td>
	</tr>
	<tr>
		<td class="td0" align="right"></td>
		<td></td>
		<td class="td0" align="right">督办类型</td>
		<td><input type="hidden" name="DBLXID" value=""
			special="wordbook" wbtype="xf_dblx" wbname="DBLXNAME"><input
			type="hidden" name="DBLXNAME" value=""></td>
	</tr>
	<tr>
		<td class="td0" align="right">国家内容分类 <FONT COLOR="#FF3366">*</FONT></td>
		<td> <input
			type="text" name="GJNRNAME" readonly value=""><input type="hidden" name="GJNRID" value=""
			special="dataindex" wbtype="GJNRFL" wbname="GJNRNAME" colneed="1" label="国家内容分类"></td>
		<td class="td0" align="right">性质分类 <FONT COLOR="#FF3366">*</FONT></td>
		<td><input type="text" readonly name="XZNAME" value="">
		<input type="hidden" name="XZID" value="" special="dataindex" wbtype="XZFL" wbname="XZNAME"  colneed="1" label="性质分类"> </td>
	</tr>
	<tr>
		<td class="td0" align="right">内容分类 <FONT COLOR="#FF3366">*</FONT></td>
		<td><input type="text" readonly name="NRNAME" value=""><input type="hidden" name="NRID" value="" special="dataindex" wbtype="NRFL" wbname="NRNAME" colneed="1" label="内容分类"> 
		</td>
		<td class="td0" align="right">信访问题分类 <FONT COLOR="#FF3366">*</FONT></td>
		<td><input
			type="text" readonly name="XFWTNAME" value=""><input type="hidden" name="XFWTID" value=""
			special="dataindex" wbtype="SBGJXFJTJ" wbname="XFWTNAME" colneed="1" label="信访问题分类"> </td>
	</tr>
	<tr>
		<td class="td0" align="right">转送方式 <FONT COLOR="#FF3366">*</FONT></td>
		<td><input type="hidden" name="ZSFSID" value=""
			special="wordbook" wbtype="xf_zsfs" wbname="ZSFSNAME" colneed="1" label="转送方式"> <input
			type="hidden" name="ZSFSNAME" value=""></td>
		<td class="td0" align="right">是否区立案</td>
		<td>是 <input type="radio" name="LA" id="LA01"
			value="1" /> 否 <input type="radio" name="LA" id="LA02" value="0"
			checked /></td>
	</tr>
	<tr>
		<td class="td0" align="right">来信类型 <FONT COLOR="#FF3366">*</FONT></td>
		<td><input type="hidden" name="LXLXID" value=""
			special="wordbook" wbtype="xf_cllx" wbname="LXLXNAME"> <input
			type="hidden" name="LXLXNAME" value="" colneed="1" label="来信类型"></td>
		<td class="td0" align="right">受信人或单位 <FONT COLOR="#FF3366">*</FONT></td>
		<td><input type="text" name="SXRDW" id="SXRDW" colneed="1" label="受信人或单位"/></td>
	</tr>
	<tr>
		<td class="td0" align="right">上级单位</td>
		<td><input type="text" name="SJDW" id="SJDW" /></td>
		<td class="td0" align="right">上级编号</td>
		<td><input type="text" name="SJBH" id="SJBH" /></td>
	</tr>
	<tr>
		<td class="td0" align="right">原始单位</td>
		<td><input type="text" name="YSDW" id="YSDW" /></td>
		<td class="td0" align="right">原始单位编号</td>
		<td><input type="text" name="YSDWBH" id="YSDWBH" /></td>
	</tr>
	<tr>
		<td class="td0" align="right">身份</td>
		<td><input type="hidden" name="SF" value="" special="wordbook"
			wbtype="xf_sf" wbname="SFNAME"> <input type="hidden"
			name="SFNAME" value=""></td>
		<td class="td0" align="right">信访原因</td>
		<td><input type="hidden" name="XFYYID" value=""
			special="wordbook" wbtype="xf_yy" wbname="XFYYNAME"> <input
			type="hidden" name="XFYYNAME" value=""></td>
	</tr>
	<tr>
		<td class="td0" align="right">人数 <FONT COLOR="#FF3366">*</FONT></td>
		<td><input type="text" name="RS" id="RS" value="1" onkeyup="value=value.replace(/[^\d]/g,'')" colneed="1" label="人数"/></td>
		<td class="td0" align="right">所属地 <FONT COLOR="#FF3366">*</FONT></td>
		<td><input type="text" name="SSDNAME" value=""><input type="hidden" name="SSD" value="" special="dataindex" wbtype="SSD" wbname="SSDNAME" colneed="1" label="所属地"></td>
	</tr>
	<tr>
		<td class="td0" align="right">信息来源 <FONT COLOR="#FF3366">*</FONT></td>
		<td><input type="hidden" name="XXLYID" value=""
			special="wordbook" wbtype="xf_xxly" wbname="XXLYNAME" colneed="1" label="信息来源"> <input
			type="hidden" name="XXLYNAME" value=""></td>
		<td class="td0" align="right">条形码编号</td>
		<td><input type="text" name="TXM" id="TXM" /></td>
	</tr>
	<tr>
		<td class="td0" align="right">是否重复反映</td>
		<td><label>首次反映 <input type="radio" name="SFCF"
			id="SFCF01" value="0" checked /> 重复反映 <input type="radio" name="SFCF"
			id="SFCF02" value="1" /><br />
		一信多投 <input type="radio" name="SFCF" id="SFCF03" value="2" /> </label></td>
		<td class="td0" align="right">被反映单位</td>
		<td><input type="text" name="BFYDW" id="BFYDW" /></td>
	</tr>
	<tr>
		<td class="td0" align="right">来信日期 <FONT COLOR="#FF3366">*</FONT></td>
		<td><input type="hidden" name="XFTIME" special="date" value="<%=DateTrimmer.getYMD() %>" colneed="1" label="来信日期"></td>
		<td class="td0" align="right">信息重要程度</td>
		<td><input type="hidden" name="ZYCDID" value=""
			special="wordbook" wbtype="xf_zycd" wbname="ZYCDNAME"> <input
			type="hidden" name="ZYCDNAME" value=""></td>
	</tr>
	<tr>
		<td class="td0" align="right">登记人</td>
		<td><input type="hidden" name="DJRNAME" value=""/></td>
		<td class="td0" align="right">限结日期</td>
		<td><input type="hidden" name="XJTIME" value="" special="date"/></td>
	</tr>
	<tr>
		<td class="td0" valign="middle" align="right">内容  <FONT COLOR="#FF3366">*</FONT></td>
		<td colspan="3"><textarea name="NR" id="NR" cols="30" rows="5" colneed="1" label="内容"></textarea></td>
	</tr>
	<tr>
		<td class="td0" valign="middle" align="right">关键字</td>
		<td colspan="3"><textarea name="GJZ" id="GJZ" cols="30" rows="5"></textarea></td>
	</tr>
	<tr>
		<td class="td0" align="right">原信</td>
		<td colspan="3"><input type="file" name="YX" id="YX" /><br/>(文件大小不能超过10M,文件类型为“.doc,.xls,.txt,.jpg,.gif,.bmp,.pdf”)</td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">处理方式 <FONT COLOR="#FF3366">*</FONT></td>
		<td colspan="3" align="left"><textarea name="CLFS" cols="80" rows="3" colneed="1" label="处理方式"></textarea> 
		<input type="hidden" name="CLFSID" value="" special="dataindex" wbtype="CLFS" wbname="CLFS">
		</td>
	</tr>
	<tr align="right" valign="middle" >
		<td class="td0">领导批示</td>
		<td colspan="3" align="left"><textarea name="LDPS" cols="80" rows="3"></textarea></td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">领导批示件</td>
		<td colspan="3" align="left"><input type="file" name="LDPSJ" id="LDPSJ" /><br/>(文件大小不能超过10M,文件类型为“.doc,.xls,.txt,.jpg,.gif,.bmp,.pdf”)
		</td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">交 办 单</td>
		<td colspan="3" align="left"><input type="file" name="JBD" id="JBD"/><br/>(文件大小不能超过10M,文件类型为“.doc,.xls,.txt,.jpg,.gif,.bmp,.pdf”)
		</td>
	</tr>
	<tr>
		<td colspan="4" class="tdtlt">
		<div align="center">来信人登记</div>
		</td>
	</tr>
	<tr>
		<td colspan="4">
		   &nbsp;
		   <img src="<%=context %>/app/xf/images/ftyes.png" title="增加" onclick="javascript:addItem();" style="cursor:hand;">
		   &nbsp;
		   <img src="<%=context %>/app/xf/images/ftno.png" title="删除" onclick="javascript:removeItem();" style="cursor:hand;">
		</td>
	</tr>
	<tr>
		<td colspan="4" class="nopadding">
		<table border="1" class="tab-noborder" id="lxr" width="100%"
			cellspacing="0" cellpadding="0">
			<tr>
				<td class="td0" style="width:10px;border:0px;">&nbsp;</td>
				<td class="td0" style="width:100px;border:0px;">来信人姓名</td>
				<td class="td0" style="width:100px;border:0px;">性别</td>
				<td class="td0" style="width:100px;border:0px;">年龄</td>
				<td class="td0" style="width:100px;border:0px;">身份证号</td>
				<td class="td0" style="width:100px;border:0px;">联系电话</td>
				<td class="td0" style="width:100px;border:0px;">邮政编码</td>
				<td class="td0" style="width:100px;border:0px;">单位或地址</td>
			</tr>
			<%
					if (list != null && !list.isEmpty()) {
					for (int i = 0; i < list.size(); i++) {
			%>
			<tr id="lxdt_<%=i %>">
				<td style="border:0px;"><input type="hidden"
					name="lxdtid_<%=i %>" special="key" id="lxdtid_<%=i %>" />
					<input type="checkbox" name="lxdtchk"
					value="lxdt_<%=i %>" idx="<%=i %>"/></td>
				<td style="border:0px;"><input type="text" name="XF_USERNAME_<%=i %>"
					id="XF_USERNAME_<%=i %>" /></td>
				<td style="border:0px;"><select name="XF_USERSEX_<%=i %>"
					id="XF_USERSEX_<%=i %>">
					<option value="1">男</option>
					<option value="0">女</option>
				</select></td>
				<td style="border:0px;"><input type="text" name="XF_USERAGE_<%=i %>"
					id="XF_USERAGE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERLICENSE_<%=i %>" id="XF_USERLICENSE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text" name="XF_USERTEL_<%=i %>"
					id="XF_USERTEL_<%=i %>" /></td>
				<td style="border:0px;"><input type="text" name="XF_USERCODE_<%=i %>"
					id="XF_USERCODE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERADDRESS_<%=i %>" id="XF_USERADDRESS_<%=i %>" /></td>
			</tr>
			<%
				}
				}
			%>
		</table>
	</td>
	</tr>
</table>
<table width="800" align="center">
	<tr>
		<td align="center" height="40"><input type="button"
			class="button0" name="btn0" value=" 提交办理 "
			onclick="javascript:handleSave();"> <input type="button"
			class="button0" name="btn1" value=" 返 回 " onclick="javascript:window.history.back(-1);"></td>
	</tr>
</table>
</form>
</BODY>
</HTML>